import request from '@/config/axios'

// 名词说明 VO
export interface KeywordsNoteVO {
  id: number // 序号
  name: string // 名称
  note: string // 注释
}

// 名词说明 API
export const KeywordsNoteApi = {
  // 查询名词说明分页
  getKeywordsNotePage: async (params: any) => {
    return await request.get({ url: `/aib/keywords-note/page`, params })
  },

  // 查询名词说明详情
  getKeywordsNote: async (id: number) => {
    return await request.get({ url: `/aib/keywords-note/get?id=` + id })
  },

  // 新增名词说明
  createKeywordsNote: async (data: KeywordsNoteVO) => {
    return await request.post({ url: `/aib/keywords-note/create`, data })
  },

  // 修改名词说明
  updateKeywordsNote: async (data: KeywordsNoteVO) => {
    return await request.put({ url: `/aib/keywords-note/update`, data })
  },

  // 删除名词说明
  deleteKeywordsNote: async (id: number) => {
    return await request.delete({ url: `/aib/keywords-note/delete?id=` + id })
  },

  // 导出名词说明 Excel
  exportKeywordsNote: async (params) => {
    return await request.download({ url: `/aib/keywords-note/export-excel`, params })
  },
}